package com.example.user1.util;

public class UserThreadLocal {
    private final static ThreadLocal<User> threadLocal = ThreadLocal.withInitial(()-> null);

    public static void set(User user){
        threadLocal.set(user);
    };

    public static User get(){
       return threadLocal.get();
    };

    public static void remove(){
        threadLocal.remove();
    }
}
